package starfire.task;

/**
 * <p>Title: JFtp</p>
 * <p>Description: ftp client</p>
 * <p>Copyright: Copyright (c) 2003</p>
 * <p>Company: </p>
 * @author starfire
 * @version 1.0
 */

public class TaskProcess {
  private long length = 0L;
  private int currentSpeed = 0;
  private int maxSpeed = 0;
  private long finished = 0L;
  private long startPosition = 0L;
  private long endPosition = 0L;

  public TaskProcess() {
  }

  public void setLength(long length)
  {
    length = length<0?0L:length;
    this.length = length;
  }

  public long getLength()
  {
    return length;
  }

  public void setCurrentSpeed(int speed)
  {
    speed = speed<0?0:speed;
    currentSpeed = speed;
  }

  public int getCurrentSpeed()
  {
    return currentSpeed;
  }

  public void setMaxSpeed (int max)
  {
    max = max<0?0:max;
    maxSpeed = max;
  }

  public int getMaxSpeed()
  {
    return maxSpeed;
  }

  public void setFinished (long finished)
  {
    this.finished = finished;
  }

  public long getFinished()
  {
    return finished;
  }

  public void setStartPosition(long start)
  {
    start = start<0?0:start;
    this.startPosition = start;
  }

  public  long getStartPosition()
  {
    return startPosition;
  }

  public void setEndPosition(long end)
  {
    end = end<0?0:end;
    this.endPosition = end;
  }

  public long getEndPosition()
  {
    return endPosition;
  }
}